<template>
  <div class="dashboard">
      <el-row :gutter="20">
        <el-col :span="24">
          <el-card class="welcome-card">
            <h2>欢迎使用 Vue Sound</h2>
            <p>这是一个基于Vue3 + TypeScript开发的语音转文字应用</p>
          </el-card>
        </el-col>
      </el-row>
      
      <el-row :gutter="20" style="margin-top: 20px;">
        <el-col :span="8">
          <el-card class="feature-card">
            <div class="feature-icon">
              <el-icon size="40" color="#409EFF">
                <Microphone />
              </el-icon>
            </div>
            <h3>语音转文字</h3>
            <p>支持实时语音识别，将语音转换为文字</p>
            <el-button type="primary" @click="$router.push('/speech')">
              开始使用
            </el-button>
          </el-card>
        </el-col>
        
        <el-col :span="8">
          <el-card class="feature-card">
            <div class="feature-icon">
              <el-icon size="40" color="#67C23A">
                <Setting />
              </el-icon>
            </div>
            <h3>设置配置</h3>
            <p>自定义语音识别参数和界面设置</p>
            <el-button type="success" @click="$router.push('/settings')">
              进入设置
            </el-button>
          </el-card>
        </el-col>
        
        <el-col :span="8">
          <el-card class="feature-card">
            <div class="feature-icon">
              <el-icon size="40" color="#67C23A">
                <Document />
              </el-icon>
            </div>
            <h3>PDF预览</h3>
            <p>支持PDF文件上传、预览、下载和打印</p>
            <el-button type="success" @click="$router.push('/pdf')">
              开始使用
            </el-button>
          </el-card>
        </el-col>
      </el-row>
      
      <el-row :gutter="20" style="margin-top: 20px;">
        <el-col :span="8">
          <el-card class="feature-card">
            <div class="feature-icon">
              <el-icon size="40" color="#E6A23C">
                <InfoFilled />
              </el-icon>
            </div>
            <h3>关于应用</h3>
            <p>了解更多关于这个应用的信息</p>
            <el-button type="warning" @click="$router.push('/about')">
              查看详情
            </el-button>
          </el-card>
        </el-col>
        
      </el-row>
    </div>
</template>

<script setup lang="ts">
// Dashboard页面组件
</script>

<style scoped>
.dashboard {
  max-width: 1200px;
  margin: 0 auto;
}

.welcome-card {
  text-align: center;
  padding: 40px;
}

.welcome-card h2 {
  color: #333;
  margin-bottom: 10px;
}

.welcome-card p {
  color: #666;
  font-size: 16px;
}

.feature-card {
  text-align: center;
  padding: 30px 20px;
  height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-icon {
  margin-bottom: 20px;
}

.feature-card h3 {
  color: #333;
  margin-bottom: 10px;
}

.feature-card p {
  color: #666;
  margin-bottom: 20px;
  flex-grow: 1;
}
</style>
